﻿@using GTAuto.DAL.DAL
@using GTAuto.DAL.Entities
@model List<GTFirmCategory>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";


    var fcol = new List<GTFirmCategory>();
    var scol = new List<GTFirmCategory>();

    bool tof = true;
    foreach (var gtFirmCategory in Model)
    {
        if (tof)
        {
            fcol.Add(gtFirmCategory);
        }
        else
        {
            scol.Add(gtFirmCategory);
        }
        tof = !tof;
    }

}
<div id="main_left">
    <div id="kurs">
        @Html.Partial("Controls/Kurs")
    </div>
    <div id="prodaja">
        @Html.Partial("Controls/Sells")
    </div>
</div>
<div id="main_center">
    <div class="shini_title">
        Каталог фирм</div>
    <div id="catalog_firm">
        <ul>
            @foreach (var item in fcol)
            {
                <li><span class="firm_img">
                       <img src="@string.Format("{0}/{1}", DALSettngs.Singleton.Get("BrendLogosAdminView").Value, item.Logo)" />
                </span><a href=@Url.Action("FirmsByCat", "Firms",new {@id=item.Id})>@item.Name</a> <span class="clear"></span></li>
            }
        </ul>
        <ul>
            @foreach (var item in scol)
            {
                <li><span class="firm_img">
                    <img src="@string.Format("{0}/{1}", DALSettngs.Singleton.Get("BrendLogosAdminView").Value, item.Logo)" />
                </span><a href=@Url.Action("FirmsByCat", "Firms",new {@id=item.Id})>@item.Name</a> <span class="clear"></span></li>
            }
        </ul>
        <div class="clear">
        </div>
    </div>
</div>
<div id="main_right">
    @Html.Partial("Controls/Bunner")
    @Html.Partial("Controls/Reklama")
</div>
